﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ERP.Manager.DataProvider;
using ERP.Manager.DataEntity;
namespace ERP.Manager.BusinessServices
{
    public class MscallerinfoService
    {
        private readonly IMscallerinfoRepository mscallerinforepository;
        public MscallerinfoService(){}
         public MscallerinfoService(IMscallerinfoRepository mscallerinforepository)
        {
            this.mscallerinforepository = mscallerinforepository;
        }
         /// <summary>
        /// 查询公告信息的访问量的方法
        /// </summary>
        /// <returns></returns>
         public List<Mscallerinfo> allgetmscallerinfo(int pagecount,int messageid)
         {
             return mscallerinforepository.allgetmscallerinfo(pagecount,messageid);
         }
          /// <summary>
        /// 查询当前用户有没有查阅公告信息的方法
        /// </summary>
        /// <param name="messageid"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
         public List<Mscallerinfo> allgetmscallerinfomessageid(int messageid, string userid)
         {
             return mscallerinforepository.allgetmscallerinfomessageid(messageid,userid);
         }
         /// <summary>
        /// 添加公告访问信息的方法
        /// </summary>
        /// <param name="messageid"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
         public int addmscallerinfo(Mscallerinfo mscaller)
         {
             return mscallerinforepository.addmscallerinfo(mscaller);
         }
        /// <summary>
        /// 查询当前公告信息访问人数的总量的方法
        /// </summary>
        /// <param name="messageid"></param>
        /// <returns></returns>
         public int allgetmscallerinfocount(int messageid)
         {
             return mscallerinforepository.allgetmscallerinfocount(messageid);
         }
    }
}
